import Vue from 'vue'
import Router from 'vue-router'

Vue.use(Router)

// 定义路由
const constantRouterMap = [
  {
    path: '/',
    redirect: '/catalog'
  },
  {
    path: '/catalog',
    name: 'catalog',
    component: () => import('@/views/catalog')
  },
  {
    path: '/01',
    name: '01',
    component: () => import('@/views/01')
  },
  {
    path: '/02',
    name: '02',
    component: () => import('@/views/02')
  }
]

export default new Router({
  mode: 'history',
  scrollBehavior: () => ({ y: 0 }),
  routes: constantRouterMap
})
